import { Component, OnInit } from '@angular/core';
import { RestService} from './services/RestService';
import { Bingo } from './domain/Bingo';

@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit{
    
	bingo : Bingo;
	
    constructor(private restService: RestService) { 
		this.bingo = new Bingo();
	}
    
	
    ngOnInit() {
        
		console.log("开始查询...");
		
        this.restService.getCurrentBingo().then(b => {
			console.log(b);
			this.bingo = b;
		});
    }
    
}
